Skip to content

Introducing the Neo4j Driver Lite #692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

bigmontz
Copy link
Contributor

This is a slimmer version of the JS Driver without the Reactive API.

This achieve by configuring the core module with the bolt-connection module.

  • Create the neo4j-driver-lite
  • Unit test to check the exposed types and interfaces
  • Basic integration test
  • Testkit tests

@bigmontz bigmontz force-pushed the 4.3-neo4j-driver-lite branch 4 times, most recently from a960b60 to 5d56559 Compare March 19, 2021 17:47
@bigmontz bigmontz marked this pull request as ready for review March 23, 2021 15:43
@bigmontz bigmontz force-pushed the 4.3-neo4j-driver-lite branch from 5d56559 to 9804ccc Compare March 23, 2021 15:53
@bigmontz bigmontz merged commit 1a49d33 into neo4j:4.3 Mar 23, 2021
@bigmontz bigmontz deleted the 4.3-neo4j-driver-lite branch March 23, 2021 16:45
bradenmacdonald pushed a commit to bradenmacdonald/vertex-framework that referenced this pull request Oct 19, 2021
This PR combines a ton of huge changes:
* Introduces a new `Field` mechanism for specifying data types and shapes. This new consistent mechanism is used for both VNode properties and cypher query responses.
* Uses the new Field mechanism to support strongly typed properties for VNodes. This also lets us introduce support for `BigInt` as well as a new `VDate` (calendar date) type.
* Actions no longer save their parameters into the DB (after all, parameters may change as the codebase evolves). Instead a complex trigger function is used to automatically capture and save a complete list of all the changes made by an action. Capturing the changes at the database level is much more robust and forwards-compatible, and allows us to simplify the implementation of actions considerably. There is now no need to manually specify how to "invert" an action, for example.
* Use [new `neo4j-driver-lite`](neo4j/neo4j-javascript-driver#692), which leaves out the Reactive API that we don't use.
* Upgrade Joi to the latest version

Notes:
* Unfortunately some weird bug in Neo4j is preventing the new trigger's custom error messages from being raised properly. So if you forget to include a modified VNode in the `modifiedNodes` list, or other common Action mistakes, you'll only get a very generic error: `Error executing triggers {trackActionChanges=Unable to complete transaction.}`. Hopefully the issue will be fixed in future Neo4j versions; I tried for a long time but wasn't able to find a workaround.
* Currently the new `UndoAction` will "soft delete" (change `:VNode` to `:DeletedVNode`) any newly created nodes. But if they have any fields with unique indexes, this could cause unexpected conflicts on the indexes of the deleted items, which are still in the database and still have their other labels. A simple solution could be to remove all labels except `:DeletedVNode` when deleting.

See merge request technotes.org/vertex-framework!12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant